/* 
* sepmpitype.h - This file is a part of the sep-library 
*
* Copyright (C) 2008 Jesper Schmidt Hansen 
* 
* License: GPL - see COPYING for copying conditions.
* There is ABSOLUTELY NO WARRANTY, not even for MERCHANTIBILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* Contact: schmidt@zigzak.net
*/

#ifndef __SEPMPITYPE_H__
#define __SEPMPITYPE_H__

#include "mpi.h"
#include "sep.h"
 
MPI_Datatype SEP_MPI_POS;
MPI_Datatype SEP_MPI_PART;

typedef struct {
  double x[3];
  char type;
} sepmpipos;


typedef struct {
  double x[3];
  double v[3];
  double x0[3];
  double m;
  char type;
} sepmpipart;

void sep_mpi_commit_pos(void);
void sep_mpi_commit_part(void);
sepmpipos *sep_mpi_pos(int npart);
void sep_mpi_free_pos(sepmpipos *ptr);
sepmpipart *sep_mpi_part(int npart);
void sep_mpi_free_part(sepmpipart *ptr);

#endif
